<template>
  <Mapbox :mapOnLoadCB="mapOnLoadCB"></Mapbox>
</template>

<script>
import {ref} from "vue"
import Mapbox from "@/components/common/Mapbox.component.vue"
import MapboxCommonService from "@/service/map/MapboxCommonService"

export default {
  name: "AddGradientLine.component",
  components: {Mapbox},
  setup() {

    let mapStore = ref({});
    let mapOnLoadCB = (map) => {
      mapStore.value = map;
      MapboxCommonService.addGradientLine(map, [
        [121.452929, 31.211292], [121.454222, 31.212712], [121.45451, 31.216233],
        [121.455084, 31.217963], [121.457456, 31.220001], [121.479447, 31.228956],
      ]);
    };

    return {
      mapOnLoadCB
    }
  }
}
</script>

<style scoped>

</style>